<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="css/pagination.css" rel="stylesheet" type="text/css" />

<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet"
	type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title></title>
<style>
.order-table{
border-collapse:unset;
}
.top-line{
	border-top: 1px solid #000;
}
.order-table tbody tr:last-child td{
	border-top: 1px solid #000;
}
 .total-info p{
 	margin-bottom:0;
 }
 .table th, .table td{
 	padding:0;
 }
 .table tr td{
   font-size: 8px;
 }
 body{
 font-size: 10px;
 }
</style>
<style media="print" type="text/css">  
.noprint{visibility:hidden}  
</style> 
</head>
<body>

<c:forEach items="${dingdans}" var="dingdan" varStatus="status">
	<div style="padding-top:1px;padding-right:11px">
		<div  id="tb-con">
			<div>
				<div class="f-l">
					<div class="f-16" style="font-weight: bolder;">e点到家</div>
					<div class="f-16" style="font-weight: bolder;">客户订货单</div>
				</div>
				<p class="f-r f-14">订单号:${dingdan.titles}</p>
				<div style="clear:both;"></div>
			</div>
			<div class="top-line">
				<div><span class="mr-10">配送时间：${dingdan.senddate}</span></div>
				<div><span class="mr-10">客户姓名：${dingdan.name}</span><span>客户电话：${dingdan.mobile}</span></div>
				<div><span class="mr-10">收货地址：${dingdan.address}</span><span></span></div>
			</div>
			<table class="table order-table top-line">
				<thead>
					<tr>
						<th class="text-l">行号</th>
						<th class="text-l">商品详情</th>
						<th class="text-l">数量</th>
						<th class="text-l">单位</th>
						<th class="text-l">规格</th>
						<th class="text-l">货位</th>
						<th class="text-l">金额</th>
					</tr>
				</thead>
				<tbody>
						<c:set scope="page" var="totalNum" value="0"></c:set>
						<c:set scope="page" var="totalPrice" value="0.00"></c:set>
						<c:forEach items="${dingdan.dingAsses}" var="dingAss" varStatus="goodsStatus">
						<tr>
							<th class="text-l">${goodsStatus.count}</th>
							<td class="text-l">${dingAss.name}</td>
							<td class="text-l">${dingAss.num}</td>
							<td class="text-l">${dingAss.unit}</td>
							<td class="text-l">${dingAss.pdt_spec}</td>
							<td class="text-l">${dingAss.erp_location}</td>
							<td class="text-l">${dingAss.price*dingAss.num}</td>
							<c:set scope="page" var="totalNum" value="${totalNum + dingAss.num}"></c:set>
							<c:set scope="page" var="totalPrice" value="${totalPrice + dingAss.num * dingAss.price}"></c:set>
						</tr>
						</c:forEach>
						<tr >
							<td class="text-l" colspan="2">合计</td>
							<td class="text-l">${totalNum}</td>
							<td class="text-c" colspan="4">${totalPrice}</td>
						</tr>
				</tbody>
			</table>
			
			<div class="total-info" style="margin-top:5px;">
				<p><span class="mr-20">运费：${dingdan.sendfee}</span><span>订单总额：${dingdan.money}</span></p>
				<p>
					<c:if test="${dingdan.cashed > 0}">
							<span class="mr-20">优惠券：-${dingdan.cashed }</span>
					</c:if>
					<c:if test="${dingdan.sumpoints >0}">
						<span>花费积分：${dingdan.sumpoints}</span>
					</c:if>
				</p>
				<p>
						<c:choose>
							<c:when test="${dingdan.zi_status == 1}">
								支付状态：已支付
							</c:when>
							<c:when test="${dingdan.zf_type == '3'}">
								<span class="mr-20">支付状态：货到付款</span><span >应收金额：${dingdan.paymoney}</span>
							</c:when>
						</c:choose>
					
				</p>
			</div>
		</div>
		 
	</div>
		 <!-- 分页打印 -->
		<c:if test="${!status.last }">
			<div style="page-break-after:always"></div>
		</c:if>
	</c:forEach>
	
	<div class="noprint" >
		<button id="printBtn" class="btn btn-success radius" onclick="printPage();">打印</button>
	</div>
	
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	
	<script type="text/javascript">
       
		function printPage(){
			 var tit = document.title;
			  document.title = "";
			  var result = window.document.execCommand('print', false, null);
			  if (!result){
			  	window.print();
			  }
			  document.title = tit;
		}
  
	</script>
</body>
</html>